<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%> 
<%
 String path = request.getContextPath();
 String basePath = request.getScheme() + "://"
   + request.getServerName() + ":" + request.getServerPort()
   + path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>权限管理登录</title>
<link href="css/login.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="javascript/login.js"></script>
</head>
<body>
<div class="login-bg">

<!--登录页面主体部分-->
  <div class="login-content-layout">
  <form action="${pageContext.request.contextPath}/j_spring_security_check" id="loginForm" style="width:260px;text-align:center;" method="post">
  <!--登录信息录入部分-->
	<div class="bg-login-content">

	<div class="login-content">
		<%if(request.getParameter("error")!=null){%>
     <div class="error">
            登陆失败<br>
     ${sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}
     </div>
    <%}%>
      <ul>
	    <li><label for="userName">用户名：</label></li>
		 <li>
		     <ul class="input-area">
		       <li class="input-left"></li>
		       <li class="input-middle-info"><input type="text" name="j_username" id="j_username" class="input-info" /></li>
		       <li class="input-right"></li>
		     </ul>
		</li>
	  </ul>
	  <ul>
	    <li><label for="password">密　码：</label></li>
		<li>
		     <ul class="input-area">
		       <li class="input-left"></li>
		       <li class="input-middle-info"><input type="password" name="j_password" id="j_password" class="input-info"/></li>
		       <li class="input-right"></li>
		     </ul>
		</li>
	  </ul>
	  <ul>
	    <li><label for="verificationCode">验证码：</label></li>
		<li>
		     <ul class="input-area">
		       <li class="input-left"></li>
		       <li class="input-middle-verificate"><input type="text" name="verificationCode" id="verificationCode" class="input-verificate" maxlength="4"/></li>
		       <li class="input-right"></li>
			   <li><img src="images/others/img-verificate.gif" alt="点击换一张" title="看不清，换一张"/></li>
		     </ul>
		</li>
	  </ul>
    </div>
	<div class="btn-enter-out" onClick="login()">登 录</div>
	</div>
	<!--结束-->
  </div>
  </form>
</div>

<!--结束-->
</body>
<script>
   function login(){
	   document.getElementById("loginForm").submit();
   }
</script>
</html>